import Vue from 'vue'
import Vuex from 'vuex'
// import state from './state'

Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    isShow: false
  },
  mutations: {
    showBar (state) {
      state.isShow = true
    },
    hideBar (state) {
      state.isShow = false
    }
  },
  getters: {
    isShowMethod (state) {
      return state.isShow
    }
  },
  actions: {
    showSliderBar (ctx) {
      ctx.commit('showBar')
    },
    hideSliderBar (ctx) {
      ctx.commit('hideBar')
    }
  }
})

export default store
